<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:68:"D:\wamp\www\tp5\public/../application/index\view\index\register.html";i:1539868538;}*/ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>REGISTER</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="/static/index/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/static/index/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="/static/index/css/amazeui.min.css" />
    <link rel="stylesheet" href="/static/index/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="/static/index/css/app.css">
    <script src="/static/index/js/jquery.min.js"></script>

</head>

<body>
    <script src="/static/index/js/theme.js"></script>
    <div class="am-g tpl-g">
        <!-- 风格切换 -->
        <div class="tpl-skiner">
            <div class="tpl-skiner-toggle am-icon-cog">
            </div>
            <div class="tpl-skiner-content">
                <div class="tpl-skiner-content-title">
                    选择主题
                </div>
                <div class="tpl-skiner-content-bar">
                    <span class="skiner-color skiner-white" data-color="theme-white"></span>
                    <span class="skiner-color skiner-black" data-color="theme-black"></span>
                </div>
            </div>
        </div>
        <div class="tpl-login">
            <div class="tpl-login-content">
                <div class="tpl-login-title">注册用户</div>
                <span class="tpl-login-content-info">
                  创建一个新的用户
              </span>


                <form class="am-form tpl-form-line-form" action="<?php echo url('index/Index/doRegister'); ?>" name="myform" method="post" onsubmit="return checkForm()">
                    
                    <div class="am-form-group">
                        <!-- <input type="text" class="tpl-form-input" id="user-name" placeholder="用户名"> -->
                        <input id="tip1" class="inp tpl-form-input" id="customer_name" type="text" name="customer_name"  value="" placeholder="请输入您的手机号" autocomplete="off"  onblur="checkTel()" oninput="checkTel()" autofocus maxlength="11">
                    </div>
                        

                    <div class="am-form-group">
                        <!-- <input type="password" class="tpl-form-input" id="user-name" placeholder="请输入密码"> -->
                        <input id="tip2" class="inp tpl-form-input" id="customer_password" type="password" name="customer_password" value="" placeholder="请输入您的密码" autocomplete="off" onblur="checkPass()">
                    </div>

                    <div class="am-form-group">
                        <!-- <input type="password" class="tpl-form-input" id="user-name" placeholder="再次输入密码"> -->
                        <input id="tip3" class="inp tpl-form-input" id="customer_repassword" type="password" name="customer_repassword" value="" placeholder="请重复您的密码" autocomplete="off" onblur="checkRepass()">
                    </div>
                        <span id="reptab"></span>

                    <div class="am-form-group">

                        <!-- <button type="button" class="am-btn am-btn-primary  am-btn-block tpl-btn-bg-color-success  tpl-login-btn">提交</button> -->
                        <input class="am-btn am-btn-primary  am-btn-block tpl-btn-bg-color-success  tpl-login-btn" id="embed-submit" type="submit" value="立即注册">

                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="/static/index/js/amazeui.min.js"></script>
    <script src="/static/index/js/app.js"></script>
    <script>
        function checkTel() {
            var customer_name = document.myform.customer_name.value;
            var tip1 = document.getElementById('tip1');
            if(/^1(?:3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8\d|9\d)\d{8}$/.test(customer_name)){

                tip1.style.color = '#0a0';
                return true;
            }else{

                tip1.style.color = '#f00';
                return false;
            }
        }

        function checkPass() {
            var customer_password = document.myform.customer_password.value;
            var tip2 = document.getElementById('tip2');
            if(customer_password.length < 6 || customer_password.length > 12){
                tip2.style.color = '#f00';
                return false;
            }else{
                tip2.style.color = '#0a0';
                return true;
            }
        }

        function checkRepass() {
            var customer_password = document.myform.customer_password.value;
            var customer_repassword = document.myform.customer_repassword.value;
            var tip3 = document.getElementById('tip3');
            if(customer_password == customer_repassword){
                tip3.style.color = '#0a0';
                return true;
            }else{
                tip3.style.color = '#f00';
                return false;
            }
        }

        // 表单提交验证
        function checkForm() {
            return checkTel() && checkPass() && checkRepass();
        }

    </script>

</body>

</html>











